import java.util.Scanner;

public class test29 {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        System.out.println("请输入机票的原价");
        int price = sc.nextInt();
        System.out.println("请输入当前的月份");
        int month = sc.nextInt();
        System.out.println("请输入 0头等舱 1经济舱");
        int place = sc.nextInt();
        if(month>13){
            System.out.println("月份不和法");}
        if (month >= 5 && month <= 10) {
                if (place == 0) {
                    System.out.println("价格为" + price * 0.9);
                } else if (place == 1) {
                    System.out.println("价格为" + price * 0.85);
                }
            }
            if (month > 11 && month < 13 || month < 4) {
                if (place == 0) {
                    System.out.println("价格为" + price * 0.7);
                } else if (place == 1) {
                    System.out.println("价格为" + price * 0.65);
                }
            }
        }
    }
